<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderManagementTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_management', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('order_number')->comment('订单号');
            $table->tinyInteger('class_type')->comment('课程分类');
            $table->string('class_information')->default('')->comment('课程信息');
            $table->string('lecturer_information')->default('')->comment('讲师信息');
            $table->string('user_information')->default('')->comment('用户信息');
            $table->tinyInteger('payment_method')->comment('支付方式');
            $table->decimal('payment_amount')->comment('支付金额');
            $table->tinyInteger('status')->comment('订单状态');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_management');
    }
}
